<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:rg="http://www.ruijie.com.cn/faces/ui"
	template="/member/layout/contentLayout.xhtml">

	<!-- 页面标题 -->
	<ui:param name="param_pageTitle" value="路远商城->我的订单" />
	<ui:param name="myOrder" value="true" />

	<ui:define name="navigation">
		<a href="http://www.luyuansc.com/">路远商城</a> 
		&gt; 
		<a href="myOrder.jsf">路远商城</a> 
		&gt; 
		我的订单
	</ui:define>
	<ui:define name="content">
		<div class="main clear">
			<div class="sidebar">
				<ui:include src="layout/nav.xhtml" />
			</div>
			<div class="middle">
		<rg:areaPanel id="orderViewInfo">
			<rg:titlePanel id="orderInfo" headerTitle="订单信息">
				<rg:fieldSet column="double">
					<rg:outputText label="订单号"
						value="#{orderViewAction.order.id}" id="num" />
					<rg:outputText label="订单状态"
						value="#{orderViewAction.order.orderStatus}" converter="#{orderStatusConverter}"
						id="status" />
					<rg:outputText label="制单时间"
						value="#{orderViewAction.order.createTime}" id="createTime"
							datePattern="yyyy-MM-dd HH:mm" converter="#{dateConverter}" />
					<rg:outputText label="订单类型"
						value="#{orderViewAction.order.orderType}" converter="#{orderTypeConverter}"
						id="orderType" />
					<rg:outputText label="折前价"
						value="#{orderViewAction.order.oldAmount}" id="oldAmount" />
					<rg:outputText label="折后价" value="#{orderViewAction.order.amount}"
						id="amount" />
					<rg:outputText label="付款方式"
						value="#{orderViewAction.order.paymentType}" converter="#{paymentTypeConverter}"
						id="payMethod" />
					<rg:outputText label="备注" singleLine="true"
						value="#{orderViewAction.order.remarks}" id="remarks" />
				</rg:fieldSet>
			</rg:titlePanel>
			<rg:titlePanel id="deliveryInfo" headerTitle="快递信息" style="margin-top:10px;">
				<rg:fieldSet column="double">
					<rg:outputText label="收货人"
						value="#{orderViewAction.order.delivery.receiver}" id="receiver" />
					<rg:outputText label="快递方式" 
						value="#{orderViewAction.order.delivery.expressCompany}" converter="#{expressCompanyConverter}" />
					<rg:outputText label="发货单号"
						value="#{orderViewAction.order.delivery.deliveryNumber}" id="shipNum" />
					<rg:outputText label="收货地址" singleLine="true"
						value="#{orderViewAction.order.delivery.deliveryAddress.getAddress()}" id="shipAddress" />
				</rg:fieldSet>
			</rg:titlePanel>
			<rg:titlePanel id="orderFormula" headerTitle="配方信息" rendered="#{orderViewAction.isFormula()}" style="margin-top:10px;">
			     <rg:fieldSet column="single">
			         <rg:outputText label="执行天数" value="#{orderViewAction.orderFormula.days}" id="days" />
			         <rg:outputText label="早餐后" value="#{orderViewAction.orderFormula.afterBreakfast}" id="afterBreakfast" />
			         <rg:outputText label="临午餐前" value="#{orderViewAction.orderFormula.beforeLunch}" id="beforeLunch" />
			         <rg:outputText label="午餐后" value="#{orderViewAction.orderFormula.afterLunch}" id="afterLunch" />
			         <rg:outputText label="临晚餐前" value="#{orderViewAction.orderFormula.beforeDinner}" id="beforeDinner" />
			         <rg:outputText label="晚餐后" value="#{orderViewAction.orderFormula.afterDinner}" id="afterDinner" />
			         <rg:outputText label="临睡前" value="#{orderViewAction.orderFormula.beforeSleep}" id="beforeSleep" />
			         <rg:outputText label="原药单" value="#{orderViewAction.orderFormula.oldDrugBill}" id="oldDrugBill" />
			         <rg:outputText label="客户要求" value="#{orderViewAction.orderFormula.customerRequire}" id="customerRequire" />
			         <rg:outputText label="配方作用" value="#{orderViewAction.orderFormula.purpose}" id="purpose" />
			         <rg:outputText label="生活注意事项" value="#{orderViewAction.orderFormula.lifeNote}" id="lifeNote" />
			         <rg:outputText label="备注" value="#{orderViewAction.orderFormula.remarks}" id="orderFormulaRemarks" />
			     </rg:fieldSet>
			</rg:titlePanel>
			<rg:titlePanel id="productInfo" headerTitle="产品信息" style="margin-top:10px;">
				<rg:table id="productTable" pagination="disable" pageSize="1"
					value="#{orderViewAction.productTableModel}" var="item">
					<rg:column property="name" title="产品名称" width="100" />
					<rg:column property="specification" title="产品规格"
						width="100" />
					<rg:column property="price" title="产品价格" width="100" />
					<rg:column property="product.productType.typeName"
						title="产品类型" width="100" />
					<rg:column title="数量" width="100">
						<h:outputText id="quantity" value="#{item.count}" />
					</rg:column>
					<rg:column  property="gift" title="是否赠品" width="100" converter="#{booleanConverter}" />
				</rg:table>
			</rg:titlePanel>
		</rg:areaPanel>
			</div>
		</div>	
	</ui:define>

</ui:composition>